package com.xuelang.pipeline.artifact.app.harborv2.response;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.xuelang.pipeline.artifact.app.harborv2.xo.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.OffsetDateTime;
import java.util.List;
import java.util.Map;

/**
 * @author xiwen.zxg
 * @since 2024/7/11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ListArtifactResponse {
    private List<Accessory> accessories;
    @JsonProperty("addition_links")
    private Map<String, AdditionLink> additionLinks;
    private Map<String, String> annotations;
    /**
     * The digest of the artifact
     */
    private String digest;
    /**
     * 扩展属性
     */
    @JsonProperty("extra_attrs")
    private Map<String, Map<String, Object>> extraAttrs;
    /**
     * The digest of the icon
     */
    private String icon;
    /**
     * The ID of the artifact
     */
    private Long id;
    /**
     * 标签
     */
    private List<Label> labels;
    /**
     * The manifest media type of the artifact
     */
    @JsonProperty("manifest_media_type")
    private String manifestMediaType;
    /**
     * The media type of the artifact
     */
    @JsonProperty("media_type")
    private String mediaType;
    /**
     * The ID of the project that the artifact belongs to
     */
    @JsonProperty("project_id")
    private Long projectId;
    /**
     * The latest pull time of the artifact
     */
    @JsonProperty("pull_time")
    private OffsetDateTime pullTime;
    /**
     * The push time of the artifact
     */
    @JsonProperty("push_time")
    private OffsetDateTime pushTime;
    /**
     * 引用
     */
    private List<Reference> references;
    /**
     * The ID of the repository that the artifact belongs to
     */
    @JsonProperty("repository_id")
    private Long repositoryId;
    /**
     * 依赖包
     */
    @JsonProperty("sbom_overview")
    private SBOMOverview sbomOverview;
    /**
     * 扫描结果
     */
    @JsonProperty("scan_overview")
    private Map<String, NativeReportSummary> scanOverview;
    /**
     * The size of the artifact
     */
    private Long size;
    /**
     * 依赖包
     */
    private List<Tag> tags;
    /**
     * The type of the artifact, e.g. image, chart, etc
     */
    private String type;
}
